In [1]:
using Plots, ApproxFun

We demonstrate numerical solution of the examples in [Hale & Olver 2016]:

Example 1
$$y(x) + {}_{-1} {\cal Q}_x^{1/2} y(x) = 1$$

In [4]:
S=Legendre()JacobiWeight(0.5,0.,Ultraspherical(1))
=LeftIntegral(S,0.5)

y=(I+)\1
plot(y)


[Plots.jl] Initializing backend: gr
INFO: Precompiling module GR...
Out[4]:
-0.5 0.0 0.5 0.50 0.75 y1

We can compare with the exact solution:


In [5]:
x=Fun()
norm(exp(1+x)*erfc(sqrt(1+x))-y)


Out[5]:
6.16319575427255e-15
Example 2
$$y + e^{-{1+x \over 2}} {}_{-1}Q_x^{1/2}[e^{1+x \over 2} y] = e^{-{1+x \over 2}}$$

In [6]:
S=Legendre()JacobiWeight(0.5,0.,Ultraspherical(1))
x=Fun()
=LeftIntegral(S,0.5)

y=(I+exp(-(1+x)/2)*[exp((1+x)/2)])\exp(-(1+x)/2)
plot(y)


Out[6]:
-0.5 0.0 0.5 0.25 0.50 0.75 y1

We can compare with the exact solution:


In [7]:
norm(y-exp((1+x)/2)*erfc(sqrt(1+x)))


Out[7]:
3.3104392104716646e-15